/*
 * httprequest.h
 *
 *  Created on: Apr 14, 2009
 *      Author: kuncai
 */

#ifndef HTTPREQUEST_H_
#define HTTPREQUEST_H_
#include "httpmsg.h"
class HttpRequest: public HttpMsg {
public:
	HttpRequest();
	HttpRequest(string msg);
	~HttpRequest();

	Buffer ToBuffer();
	string GetMethod();
	int SetMethod(string method);
	string GetVersion();
	int SetVersion(string version);
	string GetUri();
	int SetUri(string uri);
	string GetParam(string paramName);
	int  SetParam(string paramName, string paramValue);
private:
	string sMethod, sVersion, sUri;
	map<string,string> mParams;
	void Formate(string str);
	void FormateParams(string uri);
};
#endif /* HTTPREQUEST_H_ */
